package main

import "fmt"

func sum(nums ...int){
	fmt.Print(nums, "   ")
	var total int = 0
	for _, num := range nums{
		total += num
	}
	fmt.Println(total)
}

func main(){
	sum(1,3,5)
	sum(2,3,5)

	var nums []int = []int{1,2,3}
	sum(nums...)
}

